﻿

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>评论详情</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link href="../../../layuiadmin/style/mystyle.css" rel="stylesheet" />
    <script src="../../../layuiadmin/artdialog/artDialog.js?skins=chrome"></script>
    <script src="../../../layuiadmin/lib/jquery.min.js"></script>
    <script src="../../../layuiadmin/lib/api.js"></script>
    <script src="../../../layuiadmin/lib/common.js"></script>
    <!--编辑器-->
    <link href="../../../layuiadmin/kindeditor/themes/default/default.css" rel="stylesheet" />
    <script src="../../../layuiadmin/kindeditor/kindeditor-all.js"></script>
    <script src="../../../layuiadmin/kindeditor/lang/zh-CN.js"></script>
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../../plugins/common/login.js"></script>
    <script src="../../../layuiadmin/lib/system.js"></script>
    <script>
        //检查服务器是否已登录，没有登录则跳转至登录页。
        sys_islogin();
    </script>
</head>
<body>

    <div class="layui-fluid">
        <div class="layui-card">


            <div class="layui-card-body">
                <div class="layui-form" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">
                    <div style="margin-bottom: 45px;">

                        <div class="layui-form-item">
                            <div>
                                <span id="REALNAME" name="REALNAME" class="layui-form-label-new"></span>

                                <span name="CREATETIME" id="CREATETIME" class="layui-form-label-new"></span>

                            </div>
                        </div>

                        <div class="layui-form-item">

                            <div class="layui-input-inline" style="width:80%;">
                                <span name="DETAIL" id="DETAIL" class="layui-form-label-new"></span>
                            </div>
                        </div>

                    </div>

                </div>
            </div>

        </div>
    </div>

    <div class="layui-col-sm12">
        <div class="layui-card">
            <div class="layui-card-header">
                评论回复
            </div>
            <div class="layui-card-body">
                <table class="layui-table">
                    <colgroup>
                        <col width="250">
                        <col width="200">
                        <col width="100">
                        <col>
                    </colgroup>
                    <thead>
                        <tr>
                            <th>时间</th>
                            <th>用户</th>
                            <th>类型</th>
                            <th>内容</th>
                        </tr>
                    </thead>
                    <tbody id="commentlist">
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <script>
        function child_fill_data(id) {
            //获取日志
            $.ajax({
                url: "/TaskCommentMerber/GetCommentDetailByID",    //请求的url地址
                dataType: "json",   //返回格式为json
                //async: false,//请求是否异步，默认为异步，这也是ajax重要特性$("#attachCode").val()
                data: { id: id },    //参数值
                type: "GET",   //请求方式
                success: function (res) {
                    if (res.oModel) {
                        for (let key in res.oModel) {
                            $("#" + key.toUpperCase()).html(res.oModel[key]);
                        }

                    }
                    if (res.list.length > 0) {
                        var html = "";
                        for (var i = 0; i < res.list.length; i++) {
                            html += "<tr>";
                            html += "<td>" + res.list[i].CREATETIME + "</td>";
                            html += "<td>" + res.list[i].REALNAME + "</td>";
                            html += "<td>" + (res.list[i].TYPE == 1 ? "评论" : "回复评论") + "</td>";
                            html += "<td>" + (res.list[i].DETAIL ? res.list[i].DETAIL : "") + "</td>";
                           
                            html += "</tr>";
                        }
                        $("#commentlist").html(html);
                    }
                },
                error: function (res) {
                    console.log(res);
                    //layer.msg("任务附件获取失败，请联系技术人员");
                }
            })
        };
    </script>
</body>
</html>